package com.zf.yichat.config;

import com.zf.yichat.service.config.ConfigPay;
import com.zf.yichat.utils.XSpay.XSpayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 *  初始化资源
 */
@Component
public class TemptRunner implements CommandLineRunner {
    @Autowired
    private ConfigPay configPay;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("---------------------------fyn start success!!-----------------------");
        XSpayService.getInstance().init(configPay.getxSpay().getPublicKey(), configPay.getxSpay().getPrivateKey());
    }
}
